import { SAVE_CATEGORY } from "../constant"

const initState = []
let category_reducer = (preState = initState, action) => {
    const { type, data } = action
    switch (type) {
        case SAVE_CATEGORY:
            return data
        default:
            return preState
    }
}

export default category_reducer